#ifndef AI9_LOGIC_2017_UI_LOGIC_API_H
#define AI9_LOGIC_2017_UI_LOGIC_API_H
/*********************************************************************8
 * 留给播放器调用的全局函数接口
 * Wiki页面： http://git.oschina.net/lizeyan/ai9_logic_2017/wikis/%E6%92%AD%E6%94%BE%E5%99%A8%E9%9C%80%E8%A6%81%E7%9A%84%E6%8E%A5%E5%8F%A3%E5%87%BD%E6%95%B0
 */

#if defined(_MSC_VER)
//  Microsoft
    #define EXPORT __declspec(dllexport)
    #define IMPORT __declspec(dllimport)
#elif defined(__GNUC__)
//  GCC
#define EXPORT __attribute__((visibility("default")))
#define IMPORT
#else
//  do nothing and hope for the best?
    #define EXPORT
    #define IMPORT
    #pragma warning Unknown dynamic link import/export semantics.
#endif

#ifdef __cplusplus
extern "C" {
#endif
EXPORT void init();

EXPORT void loadAI(const char *fileName, int playerId);

EXPORT void run();

EXPORT void getCommand(char *result);

EXPORT void sendCommand(const char *command);

EXPORT void getReplay(char *replay);

EXPORT void getReplayOneturn(char *replay);

EXPORT int checkWin();

EXPORT void pushInfo(const char* command, int playerId);

EXPORT void invokeAI();

EXPORT void getPlayerCommand(char* result, int playerId);

EXPORT void loadFeedback(const char *fileName, int playerId);

EXPORT void pushInfoFeedback(const char* command, int playerId);

EXPORT void invokeFeedback();

EXPORT void getShowInfo(char* result);

EXPORT int getFinalWinner();

#ifdef __cplusplus
}
#endif

#endif //AI9_LOGIC_2017_UI_LOGIC_API_H
